<script setup lang="ts">

const props = defineProps({
  modelValue:{

  }
})
const emits= defineEmits(['update:modelValue'])
const selected = ref(0)
const handInputChange=()=> {
  emits('update:modelValue',selected.value)
}
const init = ()=> {
  if (props.modelValue) {
    selected.value = props.modelValue
  }

  if (!props.modelValue) {
    emits('update:modelValue',selected.value)
  }
}
watch(()=>props.modelValue,()=> {
  init()
})

init()



</script>

<template>
  <el-radio-group v-model="selected" @change="handInputChange">
    <el-radio :value="0" size="large">到店自提</el-radio>
    <el-radio :value="1" size="large">快递</el-radio>
  </el-radio-group>

</template>

<style scoped lang="scss">

</style>
